package com.xiaoma.observer.demo;

import com.xiaoma.observer.*;

import java.io.IOException;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import java.util.ServiceLoader;

/**
 * @description  
 * @author wangtianxiang
 * @date: 2021/11/24 11:17
 */
public class ObserverPatternDemo {
    public static void main(String[] args) {

        List<SendChannel> list = new ArrayList<>();
        list.add(new DDSendChannel());
        list.add(new EmailSendChannel());
        list.add(new SmsSendChannel());
        SendChannels channels = new SendChannels(list);
        channels.send("要发送的信息");
    }






}
